package com.joysuch.wwyt.core.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.joysuch.wwyt.core.entity.BaseRoleDataEmpAuth;
import org.mapstruct.Mapper;
import org.springframework.data.repository.query.Param;

import java.util.List;

@Mapper
public interface BaseRoleDataEmpAuthMapper extends BaseMapper<BaseRoleDataEmpAuth> {
    int deleteByPrimaryKey(Long id);

    int insert(BaseRoleDataEmpAuth record);

    int insertSelective(BaseRoleDataEmpAuth record);

    BaseRoleDataEmpAuth selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(BaseRoleDataEmpAuth record);

    int updateByPrimaryKey(BaseRoleDataEmpAuth record);

    void deleteBatch(List<Long> list);

    IPage<BaseRoleDataEmpAuth> queryByRoleId(Page<BaseRoleDataEmpAuth> page, @Param("roleId") Long roleId);

    BaseRoleDataEmpAuth checkRepeat(Long roleId, Long userId);

    void deleteByRoleId(Long roleId);

    List<Long> getUserIds(Long roleId);

    List<BaseRoleDataEmpAuth> selectByRoleIdempAuth(Long roleId);

    void deleteByRoleIdAndUserIds(Long roleId, List<Long> list);
}